package
{
	import com.flashdynamix.utils.SWFProfiler;
	
	import controller.Engine;
	import controller.EventController;
	
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.MouseEvent;
	
	import model.Service;
	
	import mx.controls.Alert;
	import mx.core.Application;
	import mx.core.UIComponent;

	public class MainController extends Application
	{
		private var _eventController:EventController;
		private var _services:Service;
		
		public var engine:Engine
		
		public function MainController()
		{
			super();
		}
		
		protected function init(canvas:UIComponent):void
		{
			// DEBUGGER
			SWFProfiler.init(systemManager.stage,this);
			
			systemManager.stage.scaleMode = StageScaleMode.NO_SCALE;
			systemManager.stage.align = StageAlign.TOP_LEFT;
			engine = new Engine(canvas, systemManager.stage)
			_eventController = new EventController();
			_services = new Service();
			
			//new ApplicationEvent(ApplicationEvent.GET_DATA).dispatch();
			
		}
		
		protected function onclick(e:MouseEvent):void
		{
			Alert.show();
		}
	}
}